# 法1
prompt = "\nHow old are you?"
prompt += "\nEnter 'quit' when you are finished. "
# 询问用户年龄，并指出票价
active = True
while active:
    age = input(prompt)
    if age == 'quit':
        active = False
    else:
        age = int(age)
        if age < 3:
            print("Free")
        elif 3 <= age < 12:
            print("10$")
        else:
            print("15$")
# 法2
prompt = "\nHow old are you?"
prompt += "\nEnter 'quit' when you are finished. "
# 询问用户年龄，并指出票价
while True:
    age = input(prompt)
    if age == 'quit':
        break
    age = int(age)

    if age < 3:
        print("Free")
    elif 3 <= age < 12:
        print("10$")
    else:
        print("15$")
# 法3
prompt = "\nHow old are you?"
prompt += "\nEnter 'quit' when you are finished. "
# 询问用户年龄，并指出票价
age = input(prompt)
while age != 'quit':
    age = int(age)

    if age < 3:
        print("Free")
    elif 3 <= age < 12:
        print("10$")
    else:
        print("15$")
